from django.contrib.syndication.feeds import Feed
from blog.models import Post

class BlogPostFeed(Feed):
    title = 'Blog feed'
    link = '/posts/'
    description = 'My blog posts feed.'

    def items(self):
        return Post.live.all()[:10]